<template>
  <div>
    <el-dialog
      title="查看会员"
      :visible.sync="viewMemberDialog"
      width="35%"
      @close="close"
    >
      <el-dialog
      title="查看会员"
      :visible.sync="viewMemberDialog"
      width="35%"
      @close="close"
    >
      <el-form ref="form" :model="viewForm" label-width="80px">
        <el-form-item label="会员名称">
          <el-input disabled v-model="viewForm.name" placeholder=""></el-input>
        </el-form-item>
        <el-form-item label="用户名">
          <el-input
            disabled
            v-model="viewForm.username"
            placeholder=""
          ></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input
            disabled
            v-model="viewForm.mobile"
            placeholder=""
          ></el-input>
        </el-form-item>
        <el-form-item label="会员状态">
          <div class="tags-container">
            <el-tag :type="viewForm.status === 1 ? 'success' : 'danger'">{{
              viewForm.status === 1 ? "正常" : "禁用"
            }}</el-tag>
          </div>
        </el-form-item>
        <el-form-item label="注册时间">
          <el-input
            disabled
            :value="viewForm.regTime | dateFormat"
            placeholder=""
          ></el-input>
        </el-form-item>
        <el-form-item label="最近登录">
          <el-input
            disabled
            :value="viewForm.lastLoginTime | dateFormat"
            placeholder=""
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
          <el-button @click="close">取 消</el-button>
        </span>
    </el-dialog>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    viewMemberDialog: {
      type: Boolean,
    },
  },
  data() {
    return {};
  },
  methods: {
    close() {
      this.$emit("update:viewMemberDialog", false);
    },
  },
};
</script>

<style scoped></style>
